<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>高级用户找回密码</title>
<<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../layui/css/layui.css" media="all">
<script type="text/javascript" src="../layui/lay/modules/layer.js"></script>
<script src="../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="../layui/layui.js" charset="utf-8"></script>
</head>
<style>
	body{
		background-size:100%,100%;
		overflow:hidden;
	}
</style>
<body background="../images/login.png">
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<div align="center">
		<div id="left">
		<div align="center" class="layui-tab layui-tab-card " style="width: 40%;height: 40%">
			<ul class="layui-tab-title">
				<li><font size="3">请仔细填写您的信息</font></li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
			  <form id="form" class="layui-form" action="">
			    
					<label class="layui-form-label">身份证号 : </label>
					<div class="layui-input-inline" style="width: 75%">
						<input name="sfzh" id="sfzh" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					
					<br> <br> 
					<label class="layui-form-label">联名卡卡号 : </label>
					<div class="layui-input-inline" style="width: 75%">
						<input name="grzh" id="grzh" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					
					<br> <br> 
					<label class="layui-form-label">用户姓名 : </label>
					<div class="layui-input-inline" style="width: 75%">
						<input name="yhmc" id="yhmc" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					<br> <br> 
					<div class="layui-input-inline" style="width: 100%" align="center">
						<input id="submit" type="button" class="layui-btn layui-btn-primary" value=" 找 &nbsp;&nbsp; 回 ">
					</div>
					<input type="hidden" id="Category" name="Category" value="2">
					</form>
				</div>
			</div>
		</div>
	</div>
  </div>
	<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
		});
	</script>
	<script type="text/javascript">
	
	function getPath() {  	     
	        return 'http://'+location.host;
	}
	</script>
     <script type="text/javascript" src="../layui/lay/modules/layer.js"></script>
	 <script type="text/javascript" src="../layui/layer.ext.js"></script>
      <script type="text/javascript">
     
    	  $("#submit").click(function(){
    		 
        	  var a=$("#sfzh").val();
        	  var b=$("#grzh").val();
        	  var c=$("#yhmc").val();
        	  var d=$("#Category").val();
       			  if(a=="" || a==null){
        			   layer.alert("身份证号不能为空！");  
        		  }
        		   else if(b=="" || b==null){
        			   layer.alert("个人账号不能为空！");       		  
        		  }
        		  else if(c=="" || c==null){
        			   layer.alert("用户名称不能为空！");     		  
        		  }
        		  else if(a!="" && b!="" && c!=""){
						$.ajax({
							url : getPath()+'/wsyyt/mimacontroller/gjzh',
							method : 'post',
							dataType : 'JSON',
							data: {'sfzh':a,'grzh':b,'yhmc':c,'Category':d},
							success : function(result) {
								var code = result.code;
								var body = result.body;
								if(code==0){
									layer.alert('您的密码是："+result.data[0].PASSWORD', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								      ,btn: ['确认'] //按钮
								      ,icon: 6    // icon
								      ,yes:function(){
								         window.location.href =getPath()+'/wsyyt/login/login.html';
								      }
								     });					 								  
								}else{	
									layer.alert('找回失败!', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								      ,btn: ['确认'] //按钮
								      ,icon: 6    // icon
								      ,yes:function(){
								          window.location.href =getPath()+'/wsyyt/login/GJ_zhmm.html';
								      }
								    });
								}
							}
					});		

			};
	});
      </script>
</body>
</html>